package edu.tsinghua.eea.powermanagement.data;

import java.util.Date;

public class PUItem implements Comparable<PUItem>{
	public static final int PU_TYPE_TOTAL = 1;
	public static final int PU_TYPE_SPECIFIC = 2;
	public static final int PU_TYPE_NAN = 0;
	
	public int mType;
	public int mID;
	public Date mDate;
	public float mPower;
	
	public PUItem(){
		this(PU_TYPE_TOTAL, 0, new Date(), 0);
	}
	public PUItem(int type, int id, Date date, float power){
		mType = type;
		mID = id;
		mPower = power;
		mDate = date;
	}
	
	@Override
	public int compareTo(PUItem another) {
		return (int)(this.mDate.getTime() - another.mDate.getTime());
	}
}
